package com.kate.mall.bff.wx.feign;

import com.kate.mall.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(value = "promotion-center")
public interface PromotionFeignClient {

    @GetMapping("/promotion/grouponrules/list")
    R grouponRulesList(@RequestParam(required = false) Map<String, Object> params);

    @GetMapping("/promotion/grouponrules/list")
    R listGrouponRulesByGoodsId(@RequestParam("goods_id") Integer goodsId);

    @GetMapping("/promotion/grouponrules/info/{id}")
    R queryById(@PathVariable("id") Integer grouponRulesId);

    @GetMapping("/promotion/ad/list")
    R bannerList(Map<String, Object> params);
}
